import { fetchData,postData,delData } from '@/api/index';

export default function(){
    let login_url = "/api/login"
    let getLogin = async () => {
        try{
            const res = await fetchData(login_url)
            return res
        } catch (error) {
            
        }
    }
    let postLogin = async <T>(login_info:T) => {
        try{
            const res = await postData(login_url,login_info)
            return res   
        } catch (error) {

        }
    }
    return { getLogin,postLogin }
}